From a306374142474a2ef0a61b03a8bc2e60b18c2957 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Wed, 10 Feb 2021 12:26:28 -0700 Subject: [PATCH] make src/core and jeeps includes relative to top cli directory (#688) * make jeeps includes relative to cli diretory. * make src/core includes all relative to top level src dir. --- CMakeLists.txt | 1 - GPSBabel.pro | 1 - jeeps/garminusb.h | 2 +- jeeps/gps.h | 26 +++++++++++++------------- jeeps/gpsapp.cc | 8 ++++---- jeeps/gpsapp.h | 2 +- jeeps/gpscom.cc | 2 +- jeeps/gpscom.h | 2 +- jeeps/gpsdevice.cc | 6 +++--- jeeps/gpsdevice.h | 2 +- jeeps/gpsdevice_ser.cc | 8 ++++---- jeeps/gpsdevice_usb.cc | 10 +++++----- jeeps/gpsfmt.cc | 2 +- jeeps/gpsfmt.h | 2 +- jeeps/gpslibusb.cc | 12 ++++++------ jeeps/gpsmath.cc | 4 ++-- jeeps/gpsmath.h | 2 +- jeeps/gpsmem.cc | 2 +- jeeps/gpsmem.h | 2 +- jeeps/gpsproj.cc | 2 +- jeeps/gpsproj.h | 2 +- jeeps/gpsprot.cc | 2 +- jeeps/gpsprot.h | 2 +- jeeps/gpsread.cc | 4 ++-- jeeps/gpsread.h | 2 +- jeeps/gpsrqst.cc | 2 +- jeeps/gpsrqst.h | 2 +- jeeps/gpssend.cc | 4 ++-- jeeps/gpssend.h | 2 +- jeeps/gpsserial.cc | 6 +++--- jeeps/gpsserial.h | 2 +- jeeps/gpsusbcommon.cc | 6 +++--- jeeps/gpsusbread.cc | 6 +++--- jeeps/gpsusbsend.cc | 6 +++--- jeeps/gpsusbstub.cc | 4 ++-- jeeps/gpsusbwin.cc | 10 +++++----- jeeps/gpsutil.h | 2 +- jeeps/jgpsutil.cc | 2 +- src/core/usasciicodec.cc | 2 +- 39 files changed, 82 insertions(+), 84 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f0b3dbfc..b2bd6df85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,7 +206,6 @@ if(UNIX) set(SOURCES ${SOURCES} gbser_posix.cc) set(HEADERS ${HEADERS} gbser_posix.h) set(JEEPS ${JEEPS} jeeps/gpslibusb.cc) - include_directories(AFTER jeeps) add_compile_options(-O2 -Wall) endif() diff --git a/GPSBabel.pro b/GPSBabel.pro index b21938159..620db9869 100644 --- a/GPSBabel.pro +++ b/GPSBabel.pro @@ -224,7 +224,6 @@ macx|linux|openbsd { } SOURCES += gbser_posix.cc HEADERS += gbser_posix.h - INCLUDEPATH += jeeps } win32 { diff --git a/jeeps/garminusb.h b/jeeps/garminusb.h index 4bed01eec..5fd0136ac 100644 --- a/jeeps/garminusb.h +++ b/jeeps/garminusb.h @@ -19,7 +19,7 @@ */ #include -#include "gpsdevice.h" +#include "jeeps/gpsdevice.h" /* This structure is a bit funny looking to avoid variable length * arrays which aren't present in C89. This contains the visible diff --git a/jeeps/gps.h b/jeeps/gps.h index c938f99de..1efc420d9 100644 --- a/jeeps/gps.h +++ b/jeeps/gps.h @@ -1,8 +1,8 @@ #ifndef gps_h #define gps_h -#include "../defs.h" -#include "gpsport.h" +#include "defs.h" +#include "jeeps/gpsport.h" #include #define FRAMING_ERROR -1 @@ -249,17 +249,17 @@ typedef struct GPS_SCourse_Limits { typedef int (*pcb_fn)(int, struct GPS_SWay**); -#include "gpsdevice.h" -#include "gpssend.h" -#include "gpsread.h" -#include "gpsutil.h" -#include "gpsapp.h" -#include "gpsprot.h" -#include "gpscom.h" -#include "gpsfmt.h" -#include "gpsmath.h" -#include "gpsmem.h" -#include "gpsrqst.h" +#include "jeeps/gpsdevice.h" +#include "jeeps/gpssend.h" +#include "jeeps/gpsread.h" +#include "jeeps/gpsutil.h" +#include "jeeps/gpsapp.h" +#include "jeeps/gpsprot.h" +#include "jeeps/gpscom.h" +#include "jeeps/gpsfmt.h" +#include "jeeps/gpsmath.h" +#include "jeeps/gpsmem.h" +#include "jeeps/gpsrqst.h" extern time_t gps_save_time; extern double gps_save_lat; diff --git a/jeeps/gpsapp.cc b/jeeps/gpsapp.cc index c66f28a15..6390cbce7 100644 --- a/jeeps/gpsapp.cc +++ b/jeeps/gpsapp.cc @@ -23,7 +23,7 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" +#include "jeeps/gps.h" #include #include #include @@ -36,9 +36,9 @@ * This violates the layering design, but is needed for device discovery. * See the use of gps_is_usb and GPS_Packet_Read_usb below. */ -#include "garminusb.h" -#include "gpsserial.h" -#include "gpsusbint.h" +#include "jeeps/garminusb.h" +#include "jeeps/gpsserial.h" +#include "jeeps/gpsusbint.h" time_t gps_save_time; double gps_save_lat; diff --git a/jeeps/gpsapp.h b/jeeps/gpsapp.h index 7cfca874e..e6d5d4771 100644 --- a/jeeps/gpsapp.h +++ b/jeeps/gpsapp.h @@ -2,7 +2,7 @@ #define gpsapp_h -#include "gps.h" +#include "jeeps/gps.h" int32 GPS_Init(const char* port); diff --git a/jeeps/gpscom.cc b/jeeps/gpscom.cc index cc847165e..e209ece09 100644 --- a/jeeps/gpscom.cc +++ b/jeeps/gpscom.cc @@ -24,7 +24,7 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" +#include "jeeps/gps.h" #include #include #include diff --git a/jeeps/gpscom.h b/jeeps/gpscom.h index 7bbd6a66d..5fcbe9a0a 100644 --- a/jeeps/gpscom.h +++ b/jeeps/gpscom.h @@ -2,7 +2,7 @@ #define gpscom_h -#include "gps.h" +#include "jeeps/gps.h" #include int32 GPS_Command_Off(const char* port); diff --git a/jeeps/gpsdevice.cc b/jeeps/gpsdevice.cc index 2c8e5f6f7..2c9221e3f 100644 --- a/jeeps/gpsdevice.cc +++ b/jeeps/gpsdevice.cc @@ -19,9 +19,9 @@ */ -#include "gps.h" -#include "gpsdevice.h" -#include "gpsserial.h" +#include "jeeps/gps.h" +#include "jeeps/gpsdevice.h" +#include "jeeps/gpsserial.h" extern gps_device_ops gps_serial_ops; extern gps_device_ops gps_usb_ops; diff --git a/jeeps/gpsdevice.h b/jeeps/gpsdevice.h index 194db5998..539c8ebc4 100644 --- a/jeeps/gpsdevice.h +++ b/jeeps/gpsdevice.h @@ -24,7 +24,7 @@ typedef struct gpsdevh gpsdevh; -#include "gps.h" +#include "jeeps/gps.h" #define usecDELAY 180000 /* Microseconds before GPS sends A001 */ diff --git a/jeeps/gpsdevice_ser.cc b/jeeps/gpsdevice_ser.cc index d72f687ee..2f02672c5 100644 --- a/jeeps/gpsdevice_ser.cc +++ b/jeeps/gpsdevice_ser.cc @@ -19,10 +19,10 @@ */ -#include "gps.h" -#include "gpsdevice.h" -#include "gpsread.h" -#include "gpsserial.h" +#include "jeeps/gps.h" +#include "jeeps/gpsdevice.h" +#include "jeeps/gpsread.h" +#include "jeeps/gpsserial.h" gps_device_ops gps_serial_ops = { GPS_Serial_On, diff --git a/jeeps/gpsdevice_usb.cc b/jeeps/gpsdevice_usb.cc index 96b227056..31583c5c1 100644 --- a/jeeps/gpsdevice_usb.cc +++ b/jeeps/gpsdevice_usb.cc @@ -19,11 +19,11 @@ */ -#include "gps.h" -#include "garminusb.h" -#include "gpsdevice.h" -#include "gpsusbcommon.h" -#include "gpsusbint.h" +#include "jeeps/gps.h" +#include "jeeps/garminusb.h" +#include "jeeps/gpsdevice.h" +#include "jeeps/gpsusbcommon.h" +#include "jeeps/gpsusbint.h" garmin_unit_info_t garmin_unit_info[GUSB_MAX_UNITS]; diff --git a/jeeps/gpsfmt.cc b/jeeps/gpsfmt.cc index e92db16a1..b4657aee3 100644 --- a/jeeps/gpsfmt.cc +++ b/jeeps/gpsfmt.cc @@ -21,7 +21,7 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" +#include "jeeps/gps.h" #include #include diff --git a/jeeps/gpsfmt.h b/jeeps/gpsfmt.h index 454cc77fd..cbaad086d 100644 --- a/jeeps/gpsfmt.h +++ b/jeeps/gpsfmt.h @@ -2,7 +2,7 @@ #define gpsfmt_h -#include "gps.h" +#include "jeeps/gps.h" #include #include diff --git a/jeeps/gpslibusb.cc b/jeeps/gpslibusb.cc index 4b071807d..def95886c 100644 --- a/jeeps/gpslibusb.cc +++ b/jeeps/gpslibusb.cc @@ -25,7 +25,7 @@ #include #include #if HAVE_CONFIG_H -#include "config.h" +#include "jeeps/config.h" #endif #if HAVE_LIBUSB_1_0 #ifdef LIBUSB_H_INCLUDE @@ -43,11 +43,11 @@ # include # endif #endif -#include "../defs.h" -#include "garminusb.h" -#include "gpsdevice.h" -#include "gpsusbcommon.h" -#include "../garmin_device_xml.h" +#include "defs.h" +#include "jeeps/garminusb.h" +#include "jeeps/gpsdevice.h" +#include "jeeps/gpsusbcommon.h" +#include "garmin_device_xml.h" #define GARMIN_VID 0x91e diff --git a/jeeps/gpsmath.cc b/jeeps/gpsmath.cc index 75a0a61cb..ce6aba487 100644 --- a/jeeps/gpsmath.cc +++ b/jeeps/gpsmath.cc @@ -21,8 +21,8 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" -#include "gpsdatum.h" +#include "jeeps/gps.h" +#include "jeeps/gpsdatum.h" #include #include #include diff --git a/jeeps/gpsmath.h b/jeeps/gpsmath.h index 17e44cbd5..788e3d4bc 100644 --- a/jeeps/gpsmath.h +++ b/jeeps/gpsmath.h @@ -1,7 +1,7 @@ #ifndef gpsmath_h #define gpsmath_h -#include "gpsport.h" +#include "jeeps/gpsport.h" #define GPS_PI 3.141592653589 #define GPS_FLTMIN 1.75494351E-38 diff --git a/jeeps/gpsmem.cc b/jeeps/gpsmem.cc index fc83a5a7b..5489345ae 100644 --- a/jeeps/gpsmem.cc +++ b/jeeps/gpsmem.cc @@ -24,7 +24,7 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" +#include "jeeps/gps.h" #include #include #include diff --git a/jeeps/gpsmem.h b/jeeps/gpsmem.h index fe8a73f8a..5d29231e1 100644 --- a/jeeps/gpsmem.h +++ b/jeeps/gpsmem.h @@ -2,7 +2,7 @@ #define gpsmem_h -#include "gps.h" +#include "jeeps/gps.h" GPS_PPvt_Data GPS_Pvt_New(); void GPS_Pvt_Del(GPS_PPvt_Data* thys); GPS_PAlmanac GPS_Almanac_New(); diff --git a/jeeps/gpsproj.cc b/jeeps/gpsproj.cc index 5392b249e..8f138e33b 100644 --- a/jeeps/gpsproj.cc +++ b/jeeps/gpsproj.cc @@ -21,7 +21,7 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" +#include "jeeps/gps.h" #include #include diff --git a/jeeps/gpsproj.h b/jeeps/gpsproj.h index 8cc210a26..f76814560 100644 --- a/jeeps/gpsproj.h +++ b/jeeps/gpsproj.h @@ -2,7 +2,7 @@ #define gpsproj_h -#include "gps.h" +#include "jeeps/gps.h" void GPS_Math_Albers_LatLon_To_EN(double phi, double lambda, double* E, double* N, double phi1, double phi2, diff --git a/jeeps/gpsprot.cc b/jeeps/gpsprot.cc index 629e56364..7df2f0adb 100644 --- a/jeeps/gpsprot.cc +++ b/jeeps/gpsprot.cc @@ -23,7 +23,7 @@ ** Boston, MA 02110-1301, USA. ********************************************************************/ #define COMMON -#include "gps.h" +#include "jeeps/gps.h" #include #define GPS_TAGUNK 20 diff --git a/jeeps/gpsprot.h b/jeeps/gpsprot.h index 0c96ce3cd..e16600fdf 100644 --- a/jeeps/gpsprot.h +++ b/jeeps/gpsprot.h @@ -5,7 +5,7 @@ #define COMMON extern #endif -#include "gps.h" +#include "jeeps/gps.h" /* * Link protocols diff --git a/jeeps/gpsread.cc b/jeeps/gpsread.cc index dcf7c1a46..7dbeb76ec 100644 --- a/jeeps/gpsread.cc +++ b/jeeps/gpsread.cc @@ -28,8 +28,8 @@ #include #include -#include "gps.h" -#include "gpsserial.h" +#include "jeeps/gps.h" +#include "jeeps/gpsserial.h" /* @func GPS_Time_Now *********************************************** diff --git a/jeeps/gpsread.h b/jeeps/gpsread.h index 07f61d0c1..6c57f2a2e 100644 --- a/jeeps/gpsread.h +++ b/jeeps/gpsread.h @@ -2,7 +2,7 @@ #define gpsread_h -#include "gps.h" +#include "jeeps/gps.h" time_t GPS_Time_Now(); int32 GPS_Serial_Packet_Read(gpsdevh* fd, GPS_PPacket* packet); diff --git a/jeeps/gpsrqst.cc b/jeeps/gpsrqst.cc index 84f672c6f..457eff8b1 100644 --- a/jeeps/gpsrqst.cc +++ b/jeeps/gpsrqst.cc @@ -22,7 +22,7 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" +#include "jeeps/gps.h" static int32 GPS_A600_Rqst(gpsdevh* fd, time_t Time); diff --git a/jeeps/gpsrqst.h b/jeeps/gpsrqst.h index 4482066bf..ad05722d6 100644 --- a/jeeps/gpsrqst.h +++ b/jeeps/gpsrqst.h @@ -2,7 +2,7 @@ #define gpsrqst_h -#include "gps.h" +#include "jeeps/gps.h" int32 GPS_Rqst_Send_Time(gpsdevh* fd, time_t Time); int32 GPS_Rqst_Send_Position(gpsdevh* fd, double lat, double lon); diff --git a/jeeps/gpssend.cc b/jeeps/gpssend.cc index 1416d7837..71e7dc46a 100644 --- a/jeeps/gpssend.cc +++ b/jeeps/gpssend.cc @@ -27,8 +27,8 @@ #include #include -#include "gps.h" -#include "gpsserial.h" +#include "jeeps/gps.h" +#include "jeeps/gpsserial.h" /* @funcstatic Build_Serial_Packet ************************************* ** diff --git a/jeeps/gpssend.h b/jeeps/gpssend.h index 870991138..6a213dc88 100644 --- a/jeeps/gpssend.h +++ b/jeeps/gpssend.h @@ -2,7 +2,7 @@ #define gpssend_h -#include "gps.h" +#include "jeeps/gps.h" #define GPS_ARB_LEN 1024 diff --git a/jeeps/gpsserial.cc b/jeeps/gpsserial.cc index a637dd95d..5aee770da 100644 --- a/jeeps/gpsserial.cc +++ b/jeeps/gpsserial.cc @@ -23,9 +23,9 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" -#include "../gbser.h" -#include "gpsserial.h" +#include "jeeps/gps.h" +#include "gbser.h" +#include "jeeps/gpsserial.h" #include #include #include diff --git a/jeeps/gpsserial.h b/jeeps/gpsserial.h index 80ddaf8e7..f5eba487d 100644 --- a/jeeps/gpsserial.h +++ b/jeeps/gpsserial.h @@ -2,7 +2,7 @@ #define gpsserial_h -#include "gps.h" +#include "jeeps/gps.h" #define usecDELAY 180000 /* Microseconds before GPS sends A001 */ #define DEFAULT_BAUD 9600 diff --git a/jeeps/gpsusbcommon.cc b/jeeps/gpsusbcommon.cc index b935e6cd4..6c37d0ba3 100644 --- a/jeeps/gpsusbcommon.cc +++ b/jeeps/gpsusbcommon.cc @@ -19,9 +19,9 @@ */ -#include "gps.h" -#include "garminusb.h" -#include "gpsusbcommon.h" +#include "jeeps/gps.h" +#include "jeeps/garminusb.h" +#include "jeeps/gpsusbcommon.h" /* * This receive logic is a little convoluted as we go to some efforts here diff --git a/jeeps/gpsusbread.cc b/jeeps/gpsusbread.cc index 9d20dbd8f..5b6cc996d 100644 --- a/jeeps/gpsusbread.cc +++ b/jeeps/gpsusbread.cc @@ -18,9 +18,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "garminusb.h" -#include "gps.h" -#include "gpsusbint.h" +#include "jeeps/garminusb.h" +#include "jeeps/gps.h" +#include "jeeps/gpsusbint.h" #include /* diff --git a/jeeps/gpsusbsend.cc b/jeeps/gpsusbsend.cc index f3c859095..04ac456fa 100644 --- a/jeeps/gpsusbsend.cc +++ b/jeeps/gpsusbsend.cc @@ -19,9 +19,9 @@ */ -#include "gps.h" -#include "garminusb.h" -#include "gpsusbint.h" +#include "jeeps/gps.h" +#include "jeeps/garminusb.h" +#include "jeeps/gpsusbint.h" #include #include diff --git a/jeeps/gpsusbstub.cc b/jeeps/gpsusbstub.cc index 8ffea63e9..2f350b479 100644 --- a/jeeps/gpsusbstub.cc +++ b/jeeps/gpsusbstub.cc @@ -21,10 +21,10 @@ #if HAVE_CONFIG_H -#include "config.h" +#include "jeeps/config.h" #endif -#include "../defs.h" +#include "defs.h" #if !HAVE_LIBUSB_1_0 diff --git a/jeeps/gpsusbwin.cc b/jeeps/gpsusbwin.cc index 975663c3e..2198a6056 100644 --- a/jeeps/gpsusbwin.cc +++ b/jeeps/gpsusbwin.cc @@ -27,11 +27,11 @@ #include #include -#include "../garmin_device_xml.h" -#include "garminusb.h" -#include "gps.h" -#include "gpsapp.h" -#include "gpsusbcommon.h" +#include "garmin_device_xml.h" +#include "jeeps/garminusb.h" +#include "jeeps/gps.h" +#include "jeeps/gpsapp.h" +#include "jeeps/gpsusbcommon.h" /* Constants from Garmin doc. */ diff --git a/jeeps/gpsutil.h b/jeeps/gpsutil.h index 2421d61e7..c51e5b03f 100644 --- a/jeeps/gpsutil.h +++ b/jeeps/gpsutil.h @@ -2,7 +2,7 @@ #define gpsutil_h -#include "gps.h" +#include "jeeps/gps.h" int32 GPS_Util_Little(); diff --git a/jeeps/jgpsutil.cc b/jeeps/jgpsutil.cc index e2d9ba052..92721fc1b 100644 --- a/jeeps/jgpsutil.cc +++ b/jeeps/jgpsutil.cc @@ -21,7 +21,7 @@ ** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ** Boston, MA 02110-1301, USA. ********************************************************************/ -#include "gps.h" +#include "jeeps/gps.h" #include #include #include diff --git a/src/core/usasciicodec.cc b/src/core/usasciicodec.cc index bb655e9d8..fe04b8d46 100644 --- a/src/core/usasciicodec.cc +++ b/src/core/usasciicodec.cc @@ -17,7 +17,7 @@ */ -#include "usasciicodec.h" +#include "src/core/usasciicodec.h" #include #include #include -- 2.30.2